<template>
  <a-modal
    :title="title"
    :width="width"
    :visible="visible"
    :confirmLoading="confirmLoading"
    :footer="null"
    @cancel="handleCancel"
    cancelText="关闭">
    <a-spin :spinning="confirmLoading">
      <a-card>
        <span slot="title" >
              生产订单号：{{record.ipoNo}}
          </span>
        <span slot="extra">
          状态：
            <span v-if="record.ioflag=='1'"><a-tag color="red">未推送</a-tag></span>
            <span v-if="record.ioflag=='0'"><a-tag color="green">已推送</a-tag></span>
          </span>

        <a-steps size="small" :current="current" labelPlacement="vertical">
          <a-step title="创建" description="" />
          <a-step title="生产中" description="" />
          <a-step title="产品入库" description="" />
        </a-steps>
      </a-card>
      <a-card style="margin-top: 24px">
        <span slot="title" >
           <a-icon type="pushpin" theme="twoTone" twoToneColor="blue"/> 基本信息
        </span>

        <div>
          <a-row>
            <a-col :span="3"  class="title">采购方总部编码:</a-col>
            <a-col :span="5" >{{record.purchaserHqCode}}</a-col>
            <a-col :span="3" class="title">订单类型</a-col>
            <a-col :span="5">
              <span v-if="record.ipoType=='1'">二次屏柜</span>
              <span v-if="record.ipoType=='2'">二次装置</span>
            </a-col>
            <a-col :span="3" class="title">供应商编码</a-col>
            <a-col :span="5" >{{record.supplierCode}}</a-col>
          </a-row>
          <a-row class="rows"  >
            <a-col :span="3" class="title">生产订单号:</a-col>
            <a-col :span="5">{{record.ipoNo}}</a-col>
            <a-col :span="3" class="title">品类编码:</a-col>
            <a-col :span="5">{{record.categoryCode}}</a-col>
            <a-col :span="3" class="title">种类编码:</a-col>
            <a-col :span="5">{{record.subclassCode}}</a-col>
          </a-row>
          <a-row class="rows"  >
            <a-col :span="3" class="title">销售订单号:</a-col>
            <a-col :span="5">{{record.soNo}}</a-col>
            <a-col :span="3" class="title">厂家物料编码:</a-col>
            <a-col :span="5">{{record.materialsCode}}</a-col>
            <a-col :span="3" class="title">厂家物资单位:</a-col>
            <a-col :span="5">{{record.materialsUnit}}</a-col>
          </a-row>
          <a-row class="rows"  >
            <a-col :span="3" class="title">物资id分组:</a-col>
            <a-col :span="5">{{record.productIdGrpNo}}</a-col>
            <a-col :span="3" class="title">物资id类型:</a-col>
            <a-col :span="5">{{record.productIdType}}</a-col>
            <a-col :span="3" class="title">生产数量:</a-col>
            <a-col :span="5">{{record.amount}}</a-col>
          </a-row>
          <a-row class="rows"  >
            <a-col :span="3" class="title">计量单位:</a-col>
            <a-col :span="5">{{record.unit}}</a-col>
              <a-col :span="3" class="title">厂家物料描述:</a-col>
              <a-col :span="12">{{record.materialsDesc}}</a-col>
          </a-row>
          <a-row class="rows"  >
            <a-col :span="3" class="title">厂家物料名称:</a-col>
            <a-col :span="21">{{record.materialsName}}</a-col>
          </a-row>
          <a-row class="rows"  >
            <a-col :span="3" class="title">产品型号:</a-col>
            <a-col :span="21">{{record.productModel}}</a-col>
          </a-row>
        </div>
          <!--<detail-list>-->
            <!--<detail-list-item term="采购方总部编码">{{record.purchaserHqCode}}</detail-list-item>-->
            <!--<detail-list-item term="订单类型">{{record.ipoType}}</detail-list-item>-->
            <!--<detail-list-item term="供应商编码">{{record.supplierCode}}</detail-list-item>-->
            <!--<detail-list-item term="生产订单号">{{record.ipoNo}}</detail-list-item>-->
            <!--<detail-list-item term="品类编码">{{record.categoryCode}}</detail-list-item>-->
            <!--<detail-list-item term="种类编码">{{record.subclassCode}}</detail-list-item>-->
            <!--<detail-list-item term="销售订单号">{{record.soNo}}</detail-list-item>-->
            <!--<detail-list-item term="厂家物料编码">{{record.materialsCode}}</detail-list-item>-->
            <!--<detail-list-item term="厂家物料名称">{{record.materialsName}}</detail-list-item>-->
            <!--<detail-list-item term="厂家物资单位">{{record.materialsUnit}}</detail-list-item>-->
            <!--<detail-list-item term="物资id分组">{{record.productIdGrpNo}}</detail-list-item>-->
            <!--<detail-list-item term="物资id类型">{{record.productIdType}}</detail-list-item>-->
            <!--<detail-list-item term="生产数量">{{record.amount}}</detail-list-item>-->
            <!--<detail-list-item term="计量单位">{{record.unit}}</detail-list-item>-->
            <!--<detail-list-item term="产品型号">{{record.productModel}}</detail-list-item>-->
            <!--<detail-list-item term="厂家物料描述">{{record.materialsDesc}}</detail-list-item>-->
          <!--</detail-list>-->
      </a-card>
        <a-card style="margin-top: 24px" >
           <span slot="title" >
             <a-icon type="pushpin" theme="twoTone" twoToneColor="blue"/> 其他信息
          </span>
          <a-row class="rows"  >
            <a-col :span="3" class="title">计划开始时间:</a-col>
            <a-col :span="5">{{record.planStartDate}}</a-col>
            <a-col :span="3" class="title">计划完成日期:</a-col>
            <a-col :span="5">{{record.planFinishDate}}</a-col>
            <a-col :span="3" class="title">实际开始时间:</a-col>
            <a-col :span="5">{{record.actualStartDate}}</a-col>
          </a-row>
          <a-row class="rows"  >
            <a-col :span="3" class="title">实际完成日期:</a-col>
            <a-col :span="5">{{record.actualFinishDate}}</a-col>
            <a-col :span="3" class="title">生产订单编码:</a-col>
            <a-col :span="5">{{record.plantCode}}</a-col>
            <a-col :span="3" class="title">生产工厂名称:</a-col>
            <a-col :span="5">{{record.plantName}}</a-col>
          </a-row>
          <a-row class="rows"  >

            <a-col :span="3" class="title">生产车间名称:</a-col>
            <a-col :span="5">{{record.workShopName}}</a-col>
            <a-col :span="3" class="title">生产订单状态:</a-col>
            <a-col :span="5">
              <span v-if="record.ipoStatus=='1'">创建</span>
              <span v-if="record.ipoStatus=='2'">生产中</span>
              <span v-if="record.ipoStatus=='4'">产品入库</span>
            </a-col>
            <a-col :span="3" class="title">生产中心:</a-col>
            <a-col :span="5">{{record.center}}</a-col>
          </a-row>
          <a-row class="rows"  >

            <a-col :span="3" class="title">工艺路线编码:</a-col>
            <a-col :span="5">{{record.processRouteNo}}</a-col>
            <a-col :span="3" class="title">工艺路线:</a-col>
            <a-col :span="5">{{record.processRouteNo}}</a-col>
            <a-col :span="3" class="title">数据来源:</a-col>
            <a-col :span="5">{{record.dataSource}}</a-col>
          </a-row>
          <a-row class="rows"  >

            <a-col :span="3" class="title">数据创建时间:</a-col>
            <a-col :span="5">{{record.dataSourceCreateTime}}</a-col>
            <a-col :span="3" class="title">产品型号规格:</a-col>
            <a-col :span="5" class="title">{{record.modelSpec}}</a-col>
            <a-col :span="3" class="title">是否监造标志:</a-col>
            <a-col :span="5" v-if="record.modelSpec=='1'">否</a-col>
            <a-col :span="5" v-else>是</a-col>
          </a-row>
          <!--<detail-list>-->
            <!--<detail-list-item term="计划开始时间">{{record.planStartDate}}</detail-list-item>-->
            <!--<detail-list-item term="计划完成日期">{{record.planFinishDate}}</detail-list-item>-->
            <!--<detail-list-item term="实际开始时间">{{record.actualStartDate}}</detail-list-item>-->
            <!--<detail-list-item term="实际完成日期">{{record.actualFinishDate}}</detail-list-item>-->
            <!--<detail-list-item term="生产工厂id">{{record.plantId}}</detail-list-item>-->
            <!--<detail-list-item term="生产订单编码">{{record.plantCode}}</detail-list-item>-->
            <!--<detail-list-item term="生产工厂名称">{{record.plantName}}</detail-list-item>-->
            <!--<detail-list-item term="生产车间id">{{record.workShopId}}</detail-list-item>-->
            <!--<detail-list-item term="生产车间名称">{{record.workShopName}}</detail-list-item>-->
            <!--<detail-list-item term="生产订单状态">{{record.ipoStatus}}</detail-list-item>-->
            <!--<detail-list-item term="生产中心">{{record.center}}</detail-list-item>-->
            <!--<detail-list-item term="工艺路线编码">{{record.processRouteNo}}</detail-list-item>-->
            <!--<detail-list-item term="工艺路线">{{record.processRoute}}</detail-list-item>-->
            <!--<detail-list-item term="数据来源">{{record.dataSource}}</detail-list-item>-->
            <!--<detail-list-item term="来源数据创建时间">{{record.dataSourceCreateTime}}</detail-list-item>-->
            <!--<detail-list-item term="产品型号规格">{{record.modelSpec}}</detail-list-item>-->
            <!--<detail-list-item term="是否监造标志" v-if="record.modelSpec==='1'">否</detail-list-item>-->
            <!--<detail-list-item term="是否监造标志" v-if="record.modelSpec==='0'">{是</detail-list-item>-->
          <!--</detail-list>-->
        </a-card>

    </a-spin>
    <div style="text-align: center;margin-top: 10px"><a-button type="primary" @click="()=>this.visible = false">关闭</a-button></div>
  </a-modal>
</template>

<script>

  export default {
    name: "ZxjEipScddModal",
    components: {
    },
    record:{},
    data () {
      return {
        current:0,
        title:"操作",
        width:1000,
        visible: false,
        confirmLoading: false,
        model: {},
        url: {
        }
     
      }
    },
    created () {
    },
    methods: {
      close () {
        this.$emit('close');
        this.visible = false;
      },
      addModal (record) {
          if (record.ipoStatus){
          if (record.ipoStatus=='1'||record.ipoStatus=='2') {
            this.current= parseInt(record.ipoStatus)-1;
          }else {
            this.current=parseInt(record.ipoStatus)-2;
          }
        }
        this.record=record;
        this.visible = true;
      },
      handleCancel () {
        this.close()
      }
    }
  }
</script>
<style scoped>
  @import '~@assets/less/detail.less';
</style>